local MOD_NAME = minetest.get_current_modname()

if not minetest.global_exists('element_portals') then
	element_portals = {}
end

local liquid_portals_enabled 

for _,element in ipairs({ 'water', 'lava' }) do
  element_portals[element..'_portals_enabled'] = minetest.settings:get_bool('element_portals_enable_'..element..'_portals', true)
  if element_portals[element..'_portals_enabled'] then liquid_portals_enabled = true end
end
if not liquid_portals_enabled then return end

dofile(minetest.get_modpath(MOD_NAME).."/constants.lua")

dofile(minetest.get_modpath(MOD_NAME).."/ray_nodes.lua")
dofile(minetest.get_modpath(MOD_NAME).."/portal_liquid_nodes.lua")
dofile(minetest.get_modpath(MOD_NAME).."/portal_nodes.lua")
dofile(minetest.get_modpath(MOD_NAME).."/crafts.lua")
